@extends('default.layouts.personalPublic')
@section('title', '刷新简历')
@section('headcss')
    @parent
    <link rel="stylesheet" href="{{asset('/default/css/personal/resumeRefresh.css')}}">
@endsection
@section('rightcon')
    <div class="right">
        <!--刷新简历-->
        <div class="jright">
            <div class="content">
                <div class="jobtitle">
                    <div class="tithead">
                        <h2>刷新简历</h2>
                    </div>
                </div>
                <div class="rightMain">
                    {{--简历错误信息--}}
                    @if(count($errors)>0)
                        <div class="errors">
                            <ul>
                                @if(is_object($errors))
                                    @foreach($errors->all() as $error)
                                        <li><span>{{$error}}</span></li>
                                    @endforeach
                                @else
                                    <li><span>{{$error}}</span></li>
                                @endif
                            </ul>
                        </div>
                    @endif
                    <div class="jobInfo">
                        <div class="information"><span>您的简历最近一次更新日期是：{{$resume->updatetime}}</span></div>
                        <form action="{{url("personal/post_resume_refresh")}}" method="post" name="resumeRefreshForm" id="resumeRefreshForm">
                            {{csrf_field()}}
                            <input name="id" type="hidden" value="{{$resume->id}}" />
                            {{--基本资料--}}
                            <dl>
                                <dt><span class="caption">工作经验</span></dt>
                                <dd>
                                    <input id="work_year" name="work_year" type="hidden" value="{{ $resume->work_year }}">
                                    <div id="work_year_select" class="select" style="width: 160px;"><span><a></a></span><i></i>
                                    </div>
                                </dd>
                                <dd class="errinfo"></dd>
                            </dl>
                            <dl>
                                <dt><span class="caption">手机号码</span><span class="asterisk">*</span></dt>
                                <dd><input type="text" name="mobile" id="mobile" value="{{ $resume->mobile }}"
                                           style="width: 130px;"
                                           placeholder="请输入手机号码" tip="请输入手机号码"/></dd>
                                <dd class="errinfo"></dd>
                            </dl>
                            <dl>
                                <dt><span class="caption">求职状态</span></dt>
                                <dd>
                                    <input id="job_status" name="job_status" type="hidden" value="{{ $resume->job_status }}">
                                    <div id="job_status_select" class="select" style="width: 240px;"><span><a></a></span><i></i>
                                    </div>
                                </dd>
                                <dd class="errinfo"></dd>
                            </dl>
                            <dl>
                                <dt><span class="caption">电子邮箱</span><span class="asterisk">*</span></dt>
                                <dd><input type="text" name="email" id="email" value="{{ $resume->email  }}"
                                           placeholder="请输入电子邮箱" tip="请输入电子邮箱"/></dd>
                                <dd class="errinfo"></dd>
                            </dl>
                            <dl>
                                <dt><span class="caption">QQ号码</span></dt>
                                <dd><input type="text" name="qq" id="qq" value="{{  $resume->qq  }}" style="width: 150px;"
                                           placeholder="请输入QQ号码" tip="请输入QQ号码"/></dd>
                                <dd class="errinfo"></dd>
                            </dl>
                            <dl>
                                <dt><span class="caption">通讯地址</span></dt>
                                <dd><input type="text" name="address" id="address" value="{{  $resume->address  }}"
                                            style="width: 360px;" placeholder="请输入通讯地址" tip="请输入通讯地址"/></dd>
                                <dd class="errinfo"></dd>
                            </dl>
                            <dl>
                                <dt></dt>
                                <dd>
                                    <span>
                                        <input type="radio" name="uptype" id="uptype1" class="radios" checked value="1"/>
                                        <label for="uptype1">刷新简历并更新联系方式</label>
                                    </span>
                                     <span class="mLeftTen">
                                        <input type="radio" name="uptype" id="uptype2" class="radios" value="2"/>
                                        <label for="uptype2">只更新联系方式</label>
                                    </span>
                                </dd>
                            </dl>
                            <dl style="margin-top:25px;">
                                <dt></dt>
                                <dd><input name="sub" class="subs btn" type="submit" value="确定更新"></dd>
                            </dl>
                        </form>
                    </div>
                </div>
            </div>
        </div>

    </div>
@endsection
@section('footerjs')
    @parent
    <script type="text/javascript" src="{{Resources::jsOption(['work_year'])}}"></script>
    <script type="text/javascript" src="{{Resources::jsOption(['job_status'])}}"></script>
    <script type="text/javascript" src="{{asset('/default/js/jquery/jquery.validate.extend.js')}}"></script>
    {{--刷新简历验证--}}
    <script type="text/javascript" src="{{asset('/default/js/personal/resume_refresh.js')}}"></script>
    <script>
        $('#resume_backup').addClass('on');
        var selectWork_year = $("#work_year").select({
            defaults:null,//默认按索引选中null为不选
            defaultFill:[{"value": '', "text": "请选择"}],//当defaults为null时,填空使用这个
            optionData:option_work_year,
            selected:'{{$resume->work_year}}'
        });
        var selectJobStatus = $("#job_status").select({
            defaults:null,//默认按索引选中null为不选
            defaultFill:[{"value": '', "text": "请选择"}],//当defaults为null时,填空使用这个
            optionData:option_job_status,
            selected:'{{$resume->job_status}}'
        });
    </script>
@endsection